package com.linkage.lcims.base.po.business;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;


/** 
 *        @hibernate.class
 *         table="BD_SYS_CONFIG"
 *     
*/
@SuppressWarnings("serial")
public class BdSysConfig implements Serializable {

    /** identifier field */
    private String name;

    /** persistent field */
    private String value;

    /** nullable persistent field */
    private String description;

    /** full constructor */
    public BdSysConfig(String name, String value, String description) {
        this.name = name;
        this.value = value;
        this.description = description;
    }

    /** default constructor */
    public BdSysConfig() {
    }

    /** minimal constructor */
    public BdSysConfig(String name, String value) {
        this.name = name;
        this.value = value;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="name"
     *         
     */
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    /** 
     *            @hibernate.property
     *             column="value"
     *             length="50"
     *             not-null="true"
     *         
     */
    public String getValue() {
        return this.value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    /** 
     *            @hibernate.property
     *             column="description"
     *             length="100"
     *         
     */
    public String getDescription() {
        return this.description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("name", getName())
            .toString();
    }

    public boolean equals(Object other) {
        if ( (this == other ) ) return true;
        if ( !(other instanceof BdSysConfig) ) return false;
        BdSysConfig castOther = (BdSysConfig) other;
        return new EqualsBuilder()
            .append(this.getName(), castOther.getName())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getName())
            .toHashCode();
    }

}
